<template>
  <NvCrud :option :data />
</template>

<script setup lang="ts">
import type { NvCrudOption } from 'nv-crud'
import { NvCrud } from 'nv-crud'

const data = [
  {
    name: '07akioni',
    index: '07',
    children: [
      {
        name: '08akioni',
        index: '08',
        children: [
          {
            name: '09akioni',
            index: '09',
          },
          {
            name: '10akioni',
            index: '10',
          },
        ],
      },
    ],
  },
  {
    name: '11akioni',
    index: '11',
  },
]

const option: NvCrudOption = {
  rowKey: row => row.index,
  defaultExpandAll: true,
  selection: {},
  rowActions: false,
  actionbar: false,
  toolbar: false,
  fields: {
    name: { title: 'name' },
    index: { title: 'index' },
  },
}
</script>
